package com.pencilisland.pay.mgt.app.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.pencilisland.pay.mgt.app.entity.GoodsImgEntity;

public interface GoodsImgRepository
		extends JpaRepository<GoodsImgEntity, Long>, JpaSpecificationExecutor<GoodsImgEntity> {

	GoodsImgEntity findByGoodsIdAndFileNameAndType(Long goodsId, String fileName,Integer type);

	List<GoodsImgEntity> findByGoodsIdOrderByFileNameAsc(Long goodsId);

	List<GoodsImgEntity> findByGoodsIdAndTypeOrderByFileNameAsc(Long goodsId, Integer type);

	List<GoodsImgEntity> findByGoodsIdOrderByTypeAscFileNameAsc(Long goodsId);

}
